package util;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

/**
 * Created by IntelliJ IDEA.
 * User: zslajchrt
 * Date: 28.3.11
 * Time: 12:16
 * To change this template use File | Settings | File Templates.
 */
public class JavaClassWithVariousMethodSignatures {

    static public class A {

    }

    static public class B extends A {

    }

    static public class C extends B {

    }

    public void signInVariant(List<B> r) {
        r.add(null);
        B b = null;
        r.add(b);
        B b1 = r.get(0);


        //signInVariant(new ArrayList<A>());
        //r = new ArrayList<C>();
        //r = new ArrayList<A>();
    }

    public void signCoVariant(List<? extends B> r) {
        r.add(null);
        B b = null;
        // r.add(b);
        B b1 = r.get(0);

        r = new ArrayList<C>();
        //r = new ArrayList<A>();
    }

    public void signContraVariant(List<? super B> r) {
        B b = null;
        C c = null;
        r.add(b);
        r.add(c);
        Object o = r.get(0);

        //r = new ArrayList<C>();
        r = new ArrayList<A>();
    }

    public void signContraCoVariant(List<? super Set<? extends B>> r) {

    }

    public void signContraCoContraVariant(List<? super Set<? extends List<? super B>>> r) {

    }

    public void sample1(List<? super Set<? extends List<? super String>>> r) {

    }

}
